﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace FCTIP20.Procdure
{
    [XmlRoot("系统配置")]
    [Serializable]
    public class Config
    {
        [XmlElement("NG数量")]
        public int NgCount { get; set; }

        [XmlElement("OK数量")]
        public int OkCount { get; set; }

        [XmlElement("IO模块1COM")]
        public string IOModule1 { get; set; }

        [XmlElement("耦合器COM")]
        public byte ProductCom { get; set; }

        [XmlElement("镭雕机IP")]
        public string PringterIP { get; set; }

        [XmlElement("采样次数")]
        public int ReadTimes { get; set; }

        [XmlElement("NG值次数")]
        public int ErrorTimes { get; set; }

        [XmlElement("测试配置")]
        public List<ListConfigs> ListConfigs { get; set; } = new List<ListConfigs>();

        [XmlElement("模块配置")]
        public List<ModelListConfigs> ModelListConfigs { get; set; } = new List<ModelListConfigs>();

        [XmlElement("耦合器配置")]
        public List<ListConfigs> OuheConfigsList { get; set; } = new List<ListConfigs>();
    }

    public class ListConfigs
    {
        [XmlAttribute("耦合器名")]
        public string MoBanName { get; set; }

        public string EANValue { get; set; }
    }

    public class ModelListConfigs
    {
        [XmlAttribute("模块名")]
        public string ModelName { get; set; }

        [XmlElement("EAN")]
        public string EANValue { get; set; }
    }
}